package com.wwl.collection.hashmap;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class HashMapDemo {
    public static void main(String[] args) {
        Map<String, Person> map = new HashMap<>();
        map.put("101",new Person(101,"Tom",1.72));
        map.put("100",new Person(102,"Mike",1.68));
        map.put("103",new Person(103,"Rose",1.70));

        Set<String> keys = map.keySet();
        for(String key : keys){
            Person p = map.get(key);
            System.out.println(p);
        }
    }
}
